{extend name="base" /}
{block name="css"}
<style>
#preview img{
  max-width: 600px;
  max-height:150px;
}
</style>
<link rel="stylesheet" type="text/css" href="__STATIC__/plugins/webuploader/webuploader.css?v={$v}" />
{/block}
{block name="js"}
<script type='text/javascript' src='__STATIC__/plugins/webuploader/webuploader.js?v={$v}'></script>
<script src="__INDEX__/banks/banks.js?v={$v}" type="text/javascript"></script>
{/block}
{block name="main"}
<div class="l-loading" style="display: block" id="htr-loading"></div>
<form id="adsForm">
<table class='htr-form htr-box-top'>
       <tr>
          <th width='150'>银行名称<font color='red'>*</font>：</th>
          <td><input type='text' id='bank_name' name="bank_name" value='{$data['bank_name']}' class='ipt' /></td>
       </tr>
       <tr>
          <th width='150'>银行分类<font color='red'>*</font>：</th>
          <td>
            <select id='bank_cat' name="bank_cat" class='ipt'>
              <option {if condition="$data['bank_cat'] == 0"}selected{/if} value="0">快速办卡</option>
              <option {if condition="$data['bank_cat'] == 1"}selected{/if} value="1">提额</option>
              <option {if condition="$data['bank_cat'] == 2"}selected{/if} value="2">网贷</option>
            </select>
          </td>
       </tr>
       <tr>
          <th>银行图片<font color='red'>*</font>：</th>
          <td><div id='adFilePicker'>上传银行图</div><span id='uploadMsg'></span>
              <div>
                图片大小:<span id="img_size">600x600</span>(px)，格式为 gif, jpg, jpeg, png
              </div>
          </td>

       </tr>
       <tr>
          <th>预览图<font color='red'>  </font>：</th>
          <td>
            <div id="preview" style="min-height:30px;">
              {if ($data['bank_pic']!='')}
              <img src="__ROOT__/{$data['bank_pic']}">
              {/if}
            </div>
            <input type="hidden" name="bank_pic" id="bank_pic" class="ipt" value="{$data['bank_pic']}" />
          </td>
       </tr>
       <tr>
          <th >银行地址<font color='red'>*</font>：</th>
          <td>
            <input type="text" id="bank_url" name="bank_url" class="ipt" value="{$data['bank_url']}" style="width:300px;" />
          </td>
       </tr>
        <tr>
           <th>银行状态：</th>
           <td>
             <label>
                 <input id="bank_status0" name="bank_status" value="0" class='ipt' {if condition="$data['bank_status'] == 0"}checked{/if} type="radio">显示
             </label>
             <label>
                 <input id="bank_status1" name="bank_status" value="1" class='ipt' {if condition="$data['bank_status'] == 1"}checked{/if} type="radio">隐藏
             </label>                   
           </td>
        </tr>
       <tr>
          <th>排序号：</th>
          <td>
            <input type="text" id="bank_sort" class="ipt" maxLength="20"  value="{$data['bank_sort']}" />
          </td>
       </tr>
  
  <tr>
     <td colspan='2' align='center'>
       <input type="hidden" name="bank_id" id="bank_id" class="ipt" value="{$data['bank_id']+0}" />
       <input type="submit" value="提交" class='btn btn-blue' />
       <input type="button" onclick="javascript:history.go(-1)" class='btn' value="返回" />
     </td>
  </tr>
</table>
</form>
<script>
$(function(){
editInit();
});
</script>
{/block}

